package jam.network.message;

import jam.network.*;
/**
 * Class to generate an add contact action.
 */
public class ClientActionAddContact extends ClientMessage {

	protected String message;

	/**
	 * Constructor.
	 *
	 * @param username to be added.
	 */
	public ClientActionAddContact( String user ) {
		super( NetworkController.getTransID() );
		int transID = NetworkController.getTransID();
		message = ("CA_ADD:" + transID + ":" + user);
		NetworkController.sent.put( transID, message);
		NetworkController.setTransID();
	}

	/**
	 * toString method.
	 *
	 * @returns the message to be sent across the network.
	 */
	public String toString() {
		return message;
	}

}